package com.qiche.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

public class SubscribeForm {

	private String timeRange;

	private Date startDate;

	private Date endDate;

	private Long customerId;

	private Long customerCarId;

	private Long productId;
	
	private String productName;
	
	private String keyword;

	private Date orderTime;

	private Byte status;

	private Long merchantId;

	private Long subscribeId;

	private Byte payStatus;



	public Long getProductId() {
		return productId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public Date getOrderTime() {
		return orderTime;
	}

	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
	}

	public Byte getStatus() {
		return status;
	}

	public void setStatus(Byte status) {
		this.status = status;
	}

	public String getTimeRange() {
		return timeRange;
	}

	public void setTimeRange(String timeRange) throws Exception {
		if(!"".equals(timeRange)) {
			String[] strs = timeRange.split(" ", 3);
			SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
			setStartDate(formatter.parse(strs[0]));
			setEndDate(formatter.parse(strs[2]));
		}
		
		this.timeRange = timeRange;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public Long getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(Long merchantId) {
		this.merchantId = merchantId;
	}

	public Long getSubscribeId() {
		return subscribeId;
	}

	public void setSubscribeId(Long subscribeId) {
		this.subscribeId = subscribeId;
	}

	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}

	public Long getCustomerCarId() {
		return customerCarId;
	}

	public void setCustomerCarId(Long customerCarId) {
		this.customerCarId = customerCarId;
	}

	public Byte getPayStatus() {
		return payStatus;
	}

	public void setPayStatus(Byte payStatus) {
		this.payStatus = payStatus;
	}
}
